<template>
  <div class="BlockBox_v" :style="{width:width,height:height}">
    <div class="header">
      {{ title }}
    </div>
    <div class="content">
      <slot name="content"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "BlockBox",
  props: {
    width: {
      type: String,
      default: function() {
        return "100%";
      }
    },
    height: {
      type: String,
      default: function() {
        return "100%";
      }
    },
    title: {
      type: String,
      default: function() {
        return "";
      }
    }
  }
};
</script>

<style scoped lang="less">
.BlockBox_v {
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin: 20px;

  .header {
    width: 100%;
    height: 50px;
    line-height: 50px;
    background-color: #f1f1f1;
    padding: 0 10px;
    font-weight: bold;
  }
  .content {
    width: 100%;
    height: calc(100% - 50px);
    padding: 10px;
    overflow: auto;
  }
}
</style>